package cn.yuanqiao.archive.bianjifabu.mapper;


import cn.yuanqiao.archive.appManager.domain.TenantMdataList;
import cn.yuanqiao.archive.bianjifabu.domain.Yqfabufangan;
import cn.yuanqiao.archive.bianjifabu.domain.YqfabufanganDa;
import cn.yuanqiao.archive.bianjifabu.domain.Yqfanganwater;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 发布方案Mapper接口
 *
 * @author yuanqiao
 * @date 2024-03-18
 */
public interface YqfabufanganMapper
{
    /**
     * 查询发布方案
     *
     * @param
     * @return 发布方案
     */
    public Yqfabufangan selectYqfabufanganByID(@Param("id")String ID,@Param("tableName") String tableName);

    /**
     * 查询发布方案列表
     *
     * @param Yqfabufangan 发布方案
     * @return 发布方案集合
     */
    public List<Yqfabufangan> selectYqfabufanganList(Yqfabufangan Yqfabufangan);

    List<Map<String, Object>> selectDaList(@Param("map") Map<String,Object> map);

    List<Map<String, Object>> selectDaById(@Param("id")String id,@Param("tableName")String tableName);

    List<Map<String, Object>> selectFileDataByColumns(@Param("list")List<String> list,@Param("tableName")String tableName,
                                                      @Param("columns")String columns);
    List<Map<String, Object>> selectEFileDataByColumns(@Param("list")List<String> list,@Param("tableName")String tableName,
                                                      @Param("columns")String columns);

    Integer updateBjfbState(@Param("list")List<String> list,@Param("tableName")String tableName,
                                                      @Param("idColumn")String idColumn,@Param("bjfb")String bjfb);

    Integer updateFanganDaState(@Param("list")List<String> list,@Param("tableName")String tableName,
                                                      @Param("fanganId")String fanganId,@Param("state")String state);

    List<Map<String, Object>> selectDaByNum(@Param("fanganId")String fanganId,@Param("tableName")String tableName,
                                      @Param("num")String num);


    /**
     * 新增发布方案
     *
     * @param Yqfabufangan 发布方案
     * @return 结果
     */
    public int insertYqfabufangan(Yqfabufangan Yqfabufangan);


    List<Map<String, Object>> selectDaIdByFanganId(@Param("fanganId") String fanganId,@Param("tableName") String tableName);

    List<Map<String, Object>> kfjdList(@Param("map")Map<String,Object> map);

    List<Map<String, Object>> selectDaOfKfjdJob(@Param("map")Map<String,Object> map);

    List<Map<String, Object>> getFondsAndDeptName(@Param("tenantCode")String tenantCode);

    List<Map<String, Object>> getBusinessActivity(@Param("tableName")String tableName,@Param("id")String id);

    List<Map<String, Object>> getFileList(@Param("tableName")String tableName,@Param("fanganTableName")String fanganTableName,
                                          @Param("fanganId")String fanganId);

    List<Map<String, Object>> getDocData(@Param("tableName")String tableName,@Param("daId")String daId,@Param("fileTableName")String fileTableName);

    List<Map<String, Object>> getFolderData(@Param("tableName")String tableName,@Param("folderId")String folderId);

    List<Map<String, Object>> getDhList(@Param("categoryId")String categoryId,@Param("groupId")String groupId,
                                        @Param("codelist")String codelist,@Param("coderule")String coderule,@Param("mdatalist")String mdatalist);

    List<Map<String, Object>> showColumnsByCateID(@Param("mdataListTableName")String mdataListTableName,
                                                  @Param("categoryTableName")String categoryTableName,
                                                   @Param("categoryId")Long categoryId,@Param("type")String type);

    List<TenantMdataList> getMdataListByIds(@Param("tableName") String tableName,@Param("list") List<String> list);
    /**
     * 修改发布方案
     *
     * @param Yqfabufangan 发布方案
     * @return 结果
     */
    public int updateYqfabufangan(Yqfabufangan Yqfabufangan);

    public int countDaOfFangan(@Param("fanganId")String fanganId,@Param("tableName") String tableName);

    public String sumFileSize(@Param("tableName") String tableName,@Param("list") List<String> list);

    /**
     * 删除发布方案
     *
     * @param ID 发布方案主键
     * @return 结果
     */
    public int deleteYqfabufanganByID(String ID);

    /**
     *
     * @param
     * @return 结果
     */
    public int deleteYqfabufanganByIDs(@Param("tableName") String tableName,@Param("daId") String daId,@Param("fanganId") String fanganId);

    public int insertYqfabufanganDa(YqfabufanganDa yqfabufanganDa);

    public List<YqfabufanganDa> selectYqfabufanganDaByFanganId(@Param("fanganId")String fanganId,@Param("tableName")String tableName);
    public List<Map<String, Object>> selectYqfabufanganDaByFanganId2(@Param("fanganId")String fanganId,@Param("tableName")String tableName);

    public List<Yqfanganwater> selectYqfanganwaterList(Yqfanganwater Yqfanganwater);

    public int insertYqfanganwater(Yqfanganwater Yqfanganwater);

    public int updateYqfanganwater(Yqfanganwater Yqfanganwater);

    int createFabufangan(@Param("tableName") String tableName);

    int createFabufanganDa(@Param("tableName") String tableName);

    int createFanganWater(@Param("tableName") String tableName);
}
